DEFINITION MODULE INTRINSIC;

(*
Procedures that should be intrinsic.

UK __DATE__ __TIME__
*)

(*DEF_SWITCHES*)

FROM PORTAB IMPORT ANYWORD,ANYLONG,ANYTYPE,ANYPOINTER;
FROM SYSTEM IMPORT WORD;

#if (defined ISOM2) || (defined TSM2_1)
IMPORT SYSTEM;
#endif
#if (defined TSM2_1) || (defined TSM2_2)
IMPORT Lib;
#endif
#if export
EXPORT QUALIFIED LONG,SHORT,VOID,PTR,INCPTR,DECPTR,SHIFT;
#endif

#if not ((defined MSM2)   || (defined MM2)    || (defined FSTM2) || \
         (defined TSM2_1) || (defined TSM2_2) || (defined LM2)   || \
         (defined FTLM2)  || (defined TDIM2))
PROCEDURE LONG(AnyWord: ANYWORD): ANYLONG;

PROCEDURE SHORT(AnyLong: ANYLONG): ANYWORD;
#endif

PROCEDURE VOID(AnyWord: WORD);

#ifdef ISOM2
CONST PTR = SYSTEM.ADR;

      INCPTR = SYSTEM.ADDADR;

      DECPTR = SYSTEM.SUBADR;

      SHIFT = SYSTEM.SHIFT;
#else

#if (defined TSM2_1) || (defined TSM2_2)
CONST PTR ::= SYSTEM.ADR;
#else
PROCEDURE PTR(VAR AnyThing: ARRAY OF ANYTYPE): ANYPOINTER;
#endif

#if (defined TSM2_1) || (defined TSM2_2)
CONST INCPTR ::= Lib.IncAddr;

      DECPTR ::= Lib.DecAddr;
#else
PROCEDURE INCPTR(VAR Ptr: ANYPOINTER; Add: CARDINAL);

PROCEDURE DECPTR(VAR Ptr: ANYPOINTER; Sub: CARDINAL);
#endif

PROCEDURE SHIFT(Word: ANYWORD; Amount: INTEGER): ANYWORD;
#endif
END INTRINSIC.
